<%--
  Created by IntelliJ IDEA.
  User: 33333333
  Date: 2020/9/19
  Time: 11:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="upDown">
    <div class="accordion" id="accordionExample">
        <c:forEach items="${productCategoryList}" var="list" varStatus="status">
            <c:if test="${list.epcId == list.epcParentId}">
                <div class="card">
                    <div class="card-header no-padding" id="heading-${list.epcParentId}">
                        <h2 class="mb-0">
                            <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapse-${list.epcParentId}" aria-expanded="false" aria-controls="collapse-${list.epcParentId}">
                                    ${list.epcName}
                            </button>
                        </h2>
                    </div>
                <div id="collapse-${list.epcParentId}" class="collapse" aria-labelledby="heading-${list.epcParentId}" data-parent="#accordionExample">
                <div class="card-body no-padding">
                <ul class="list-group list-group-flush">
            </c:if>
            <c:if test="${list.epcId!=list.epcParentId}">
                <li class="list-group-item">
                            <a href="${pageContext.request.contextPath}/f-index/category?id=${list.epcId}">${list.epcName}</a>
                </li>
                <c:if test="${productCategoryList[status.index+1]==null||list.epcParentId!=productCategoryList[status.index+1].epcParentId}">
                    </ul>
                    </div>
                    </div>
                    </div>
                </c:if>
            </c:if>
        </c:forEach>
    </div>
</div>